<!-- original chat tab content (commented out) -->
<div class="row justify-content-center">
    <!-- 左侧聊天区域 -->
    <div class="col-md-8">
        <div class="card shadow-sm">
            <!-- 聊天头部 -->
            <div class="card-header bg-primary text-white d-flex justify-content-between align-items-center">
                <h2 class="h5 mb-0">
                    <i class="fa fa-comments-o mr-2"></i>聊天室
                </h2>
                <div class="d-flex align-items-center">
                    <span id="status" class="badge bg-danger text-white me-2">
                        未连接
                    </span>
                    <button id="connect" class="btn btn-light btn-sm">
                        连接
                    </button>
                </div>
            </div>

            <!-- 聊天日志 -->
            <div id="log" class="card-body bg-white h-80 overflow-auto" style="height: 400px;">
                <div class="p-3 text-center text-muted">
                    <i class="fa fa-commenting-o fa-2x mb-2"></i>
                    <p>点击上方"连接"按钮开始聊天</p>
                </div>
            </div>

            <!-- 输入区域 -->
            <div class="card-footer bg-white p-3">
                <form id="chatform" class="d-flex">
                    <input type="text" id="text" class="form-control me-2" placeholder="输入消息或命令..." autocomplete="off">
                    <button type="submit" id="send" class="btn btn-primary">
                        发送
                    </button>
                </form>
                <div class="mt-2 d-flex gap-2">
                    <input type="file" id="chat-image-input" accept="image/*" hidden>
                    <input type="file" id="chat-camera-input" accept="image/*" capture="environment" hidden>
                    <input type="file" id="chat-video-input" accept="video/*" hidden>
                    <input type="file" id="chat-audio-input" accept="audio/*" capture="microphone" hidden>
                    <button type="button" class="btn btn-outline-secondary btn-sm" id="chat-send-image">
                        <i class="fa fa-image"></i> 图片
                    </button>
                    <button type="button" class="btn btn-outline-secondary btn-sm" id="chat-send-camera">
                        <i class="fa fa-camera"></i> 拍照
                    </button>
                    <button type="button" class="btn btn-outline-secondary btn-sm" id="chat-send-video">
                        <i class="fa fa-film"></i> 视频
                    </button>
                    <button type="button" class="btn btn-outline-secondary btn-sm" id="chat-send-audio">
                        <i class="fa fa-music"></i> 音频
                    </button>
                </div>
            </div>
        </div>
    </div>

    <!-- 右侧命令指南 -->
    <div class="col-md-4 mt-4 mt-md-0">
        <div class="card shadow-sm">
            <div class="card-header bg-info text-white">
                <h2 class="h5 mb-0">
                    <i class="fa fa-terminal mr-2"></i>命令指南
                </h2>
            </div>
            <div class="card-body">
                <ul class="list-group list-group-flush">
                    <li class="list-group-item d-flex justify-content-between">
                        <code class="text-primary">/list</code>
                        <span class="text-muted">列出所有房间</span>
                    </li>
                    <li class="list-group-item d-flex justify-content-between">
                        <code class="text-primary">/join 房间名</code>
                        <span class="text-muted">加入或创建房间</span>
                    </li>
                    <li class="list-group-item d-flex justify-content-between">
                        <code class="text-primary">/name 用户名</code>
                        <span class="text-muted">设置您的昵称</span>
                    </li>
                    <li class="list-group-item d-flex justify-content-between">
                        <code class="text-primary">/to 用户名 消息</code>
                        <span class="text-muted">发送私信</span>
                    </li>
                    <li class="list-group-item d-flex justify-content-between">
                        <code class="text-primary">/history [房间名] [数量]</code>
                        <span class="text-muted">查看历史消息</span>
                    </li>
                    <li class="list-group-item d-flex justify-content-between">
                        <code class="text-primary">普通文本</code>
                        <span class="text-muted">发送消息给房间内所有人</span>
                    </li>
                </ul>
            </div>
        </div>

        <!-- 当前信息 -->
        <div class="cardsm mt-4">
            <div class="card-header bg-secondary text-white">
                <h2 class="h5 mb-0">
                    <i class="fa fa-info-circle mr-2"></i>当前信息
                </h2>
            </div>
            <div class="card-body">
                <div class="mb-2">
                    <strong>服务器地址:</strong> <span id="server-address" class="text-muted">--</span>
                </div>
                <div class="mb-2">
                    <strong>当前房间:</strong> <span id="current-room" class="text-muted">默认</span>
                </div>
                <div>
                    <strong>您的昵称:</strong> <span id="current-name" class="text-muted">未设置</span>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- end original chat tab content -->